POV-Ray : Newsgroups : povray.unofficial.patches : Your wanted features : Re: Your wanted features Server Time
28 Sep 2024 16:50:46 EDT (-0400)
  Re: Your wanted features  
From: Warp
Date: 5 Jun 2003 13:19:15
Message: <3edf7b93@news.povray.org>
Christopher James Huff <cja### [at] earthlinknet> wrote:
> portal pigment: I've made some posts about this before, I just need to 
> get it into release-ready form. It's a pigment that serves as a "portal" 
> into another area of the scene.

  I see two possible ways of implementing this:

  1: The pigment works as a projection plane of a secondary camera. That is,
     When the color of the point <x,y> is asked from the pigment, these
     coordinates are converted to the secondary projection plane coordinates,
     and a ray is raytraced from the secondary camera passing through that
     point.
       The effect of this method is exactly the same as if you had rendered
     an image with the secondary camera and then used this resulting image
     as an image map in the final scene (which is rendered using the main
     camera). The advantage being, of course, that only those pixels which
     are really needed are traced and you don't need a temporary image file.

  2: The pigment warps rays to another location. That is, when a ray hits
     the object and the color of the surface is requested, a given offset
     is added to the intersection point and a new ray is traced in the
     same direction as the original incoming ray. A given transformation
     may be applied to the ray as well.
       This would allow making, eg. windows which show scenery from a
     completely different part of the scene (ie. which are not really
     behind that window). The difference with the implementation 1 is
     that when you move the camera, you see different parts of the
     scene through the portal.

  I think that both of these variants are useful. It might be a good idea
to implement them both.

-- 
plane{-x+y,-1pigment{bozo color_map{[0rgb x][1rgb x+y]}turbulence 1}}
sphere{0,2pigment{rgbt 1}interior{media{emission 1density{spherical
density_map{[0rgb 0][.5rgb<1,.5>][1rgb 1]}turbulence.9}}}scale
<1,1,3>hollow}text{ttf"timrom""Warp".1,0translate<-1,-.1,2>}//  - Warp -


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.